package tx.core;

/**
 * A J Tetraminoe.
 * @author Guilherme Mauro Germoglio Barbosa - germoglio@gmail.com
 */
public class JTetraminoe extends Tetraminoe {

	/**
	 * The relative coordinates for rotation of this tetraminoe.
	 */
	private static final int[][][] J_RELATIVE_COORDINATES = {   
															{ 
															   {0, 0},
															   {0, 1},
															   {1, 1},
															   {2, 1}
															},
															{ 
															   {1, 0},
															   {1, 1},
															   {1, 2},
															   {2, 0}
															},
															{ 
																{0, 1},
																{1, 1},
																{2, 1},
																{2, 2}
															},
															{ 
																{0, 2},
																{1, 0},
																{1, 1},
																{1, 2}
															},
														};
	
	/**
	 * The rotation offsets, in order to correct positions after the rotation.
	 */
	private static final int[][] J_ROTATION_OFFSETS = {
													{0, 0},
													{-1, 0},
													{0, -1},
													{0, -2}
												};
	
	
	/**
	 * Creates a J Tetraminoe with the specified color. It will be a J rotate 90 degrees clockwise.
	 * @param color The color. It can be found in tx.core.BlockColors constants.
	 */
	public JTetraminoe(int color) {
		super(color, J_RELATIVE_COORDINATES, J_ROTATION_OFFSETS);
	}
	

}
